home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / Tools / Dev / powerd / lib / powerd_lib.lha / PowerD / NewEStr.ass < prev    next >
Encoding:
Text File  |  1999-06-23  |  316 b   |  18 lines

  1. ; d0 - length
  2.  
  3.     xdef    _NewEStr
  4.  
  5. _NewEStr    movem.l    d2/a6,-(a7)
  6.     move.l    d0,d2
  7.     addq.l    #4,d0        ; add header
  8.     move.l    #$50000,d1    ; MEMF_CLEAR|MEMF_REVERSE
  9.     movea.l    $4.w,a6
  10.     jsr    (-198,a6)        ; AllocMem
  11.     tst.l    d0
  12.     beq.s    .finish
  13.     addq.l    #4,d0        ; shift by header
  14.     movea.l    d0,a0
  15.     move.w    d2,(-4,a0)
  16. .finish    movem.l    (a7)+,d2/a6
  17.     rts
  18.